import request from '@/utils/request'

// 查询组织架构部门信息列表

export function listDepartment(query) {
  return request({
    url: '/department/tree',
    method: 'get',
    params: query
  })
}

// 查询组织架构部门信息详细
export function getDepartment(id) {
  return request({
    url: '/department/' + id,
    method: 'get'
  })
}

// 新增组织架构部门信息
export function addDepartment(data) {
  return request({
    url: '/department',
    method: 'post',
    data: data
  })
}

// 修改组织架构部门信息
export function updateDepartment(data) {
  return request({
    url: '/department',
    method: 'put',
    data: data
  })
}

// 删除组织架构部门信息
export function delDepartment(id) {
  return request({
    url: '/department/' + id,
    method: 'delete'
  })
}
